<?php
require_once (__DIR__ . '/../models/Accounts.php');

echo '
  <div class="top-navigation">';
if(IsLoggedIn()){
  echo '
    <span>Welcome, <b>' . UserName() . '</b></span>
    <ul>
      ' . ($controller == 'Home' ? '<li><a href="#" class="view-cart">Show Cart</a></li>' : '') . '
      <li><a href="' . $rootUrl . '/../W/Accounts/logout/">Click to Logout</a></li>
    </ul>';
}
else {
  echo '
    <a href="' . $rootUrl . '/../W/Accounts/login/">Click to Log In</a>';
}

echo '
  </div>';
?>